#!/usr/bin/bash
#将默认源修改成aliyun的源
#version:1.0



cd  /etc/yum.repos.d  
mv CentOS-Base.repo CentOS-Base.repobak

curl -o /etc/yum.repos.d/CentOS-Base.repo  http://mirrors.aliyun.com/repo/Centos-7.repo 
if [ -f /etc/yum.repos.d/epel.repo ] 
then
mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup 

fi

curl  http://mirrors.aliyun.com/repo/epel-7.repo >epel.repo


yum makecache

